3.1.7 \(\int \frac {(a+b \log (c x^n)) \log (1+e x)}{x^2} \, dx\) [7]

Optimal. Leaf size=107 \[ b e n \log (x)-\frac {1}{2} b e n \log ^2(x)+e \log (x) \left (a+b \log \left (c x^n\right )\right )-b e n \log (1+e x)-\frac {b n \log (1+e x)}{x}-e \left (a+b \log \left (c x^n\right )\right ) \log (1+e x)-\frac {\left (a+b \log \left (c x^n\right )\right ) \log (1+e x)}{x}-b e n \text {Li}_2(-e x) \]

[Out]

b*e*n*ln(x)-1/2*b*e*n*ln(x)^2+e*ln(x)*(a+b*ln(c*x^n))-b*e*n*ln(e*x+1)-b*n*ln(e*x+1)/x-e*(a+b*ln(c*x^n))*ln(e*x
+1)-(a+b*ln(c*x^n))*ln(e*x+1)/x-b*e*n*polylog(2,-e*x)

________________________________________________________________________________________

Rubi [A]
time = 0.05, antiderivative size = 107, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.350, Rules used = {2442, 36, 29, 31, 2423, 2338, 2438} \begin {gather*} -b e n \text {PolyLog}(2,-e x)+e \log (x) \left (a+b \log \left (c x^n\right )\right )-e \log (e x+1) \left (a+b \log \left (c x^n\right )\right )-\frac {\log (e x+1) \left (a+b \log \left (c x^n\right )\right )}{x}-\frac {1}{2} b e n \log ^2(x)+b e n \log (x)-b e n \log (e x+1)-\frac {b n \log (e x+1)}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[((a + b*Log[c*x^n])*Log[1 + e*x])/x^2,x]

[Out]

b*e*n*Log[x] - (b*e*n*Log[x]^2)/2 + e*Log[x]*(a + b*Log[c*x^n]) - b*e*n*Log[1 + e*x] - (b*n*Log[1 + e*x])/x -
e*(a + b*Log[c*x^n])*Log[1 + e*x] - ((a + b*Log[c*x^n])*Log[1 + e*x])/x - b*e*n*PolyLog[2, -(e*x)]

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 36

Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x), x], x] -
Dist[d/(b*c - a*d), Int[1/(c + d*x), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]

Rule 2338

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/(x_), x_Symbol] :> Simp[(a + b*Log[c*x^n])^2/(2*b*n), x] /; FreeQ[{a
, b, c, n}, x]

Rule 2423

Int[Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))^(r_.)]*((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((g_.)*(x_))^(q_.), x_Sym
bol] :> With[{u = IntHide[(g*x)^q*Log[d*(e + f*x^m)^r], x]}, Dist[a + b*Log[c*x^n], u, x] - Dist[b*n, Int[Dist
[1/x, u, x], x], x]] /; FreeQ[{a, b, c, d, e, f, g, r, m, n, q}, x] && (IntegerQ[(q + 1)/m] || (RationalQ[m] &
& RationalQ[q])) && NeQ[q, -1]

Rule 2438

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2, (-c)*e*x^n]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 2442

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))*((f_.) + (g_.)*(x_))^(q_.), x_Symbol] :> Simp[(f + g*
x)^(q + 1)*((a + b*Log[c*(d + e*x)^n])/(g*(q + 1))), x] - Dist[b*e*(n/(g*(q + 1))), Int[(f + g*x)^(q + 1)/(d +
 e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n, q}, x] && NeQ[e*f - d*g, 0] && NeQ[q, -1]

Rubi steps

\begin {align*} \int \frac {\left (a+b \log \left (c x^n\right )\right ) \log (1+e x)}{x^2} \, dx &=e \log (x) \left (a+b \log \left (c x^n\right )\right )-e \left (a+b \log \left (c x^n\right )\right ) \log (1+e x)-\frac {\left (a+b \log \left (c x^n\right )\right ) \log (1+e x)}{x}-(b n) \int \left (\frac {e \log (x)}{x}-\frac {\log (1+e x)}{x^2}-\frac {e \log (1+e x)}{x}\right ) \, dx\\ &=e \log (x) \left (a+b \log \left (c x^n\right )\right )-e \left (a+b \log \left (c x^n\right )\right ) \log (1+e x)-\frac {\left (a+b \log \left (c x^n\right )\right ) \log (1+e x)}{x}+(b n) \int \frac {\log (1+e x)}{x^2} \, dx-(b e n) \int \frac {\log (x)}{x} \, dx+(b e n) \int \frac {\log (1+e x)}{x} \, dx\\ &=-\frac {1}{2} b e n \log ^2(x)+e \log (x) \left (a+b \log \left (c x^n\right )\right )-\frac {b n \log (1+e x)}{x}-e \left (a+b \log \left (c x^n\right )\right ) \log (1+e x)-\frac {\left (a+b \log \left (c x^n\right )\right ) \log (1+e x)}{x}-b e n \text {Li}_2(-e x)+(b e n) \int \frac {1}{x (1+e x)} \, dx\\ &=-\frac {1}{2} b e n \log ^2(x)+e \log (x) \left (a+b \log \left (c x^n\right )\right )-\frac {b n \log (1+e x)}{x}-e \left (a+b \log \left (c x^n\right )\right ) \log (1+e x)-\frac {\left (a+b \log \left (c x^n\right )\right ) \log (1+e x)}{x}-b e n \text {Li}_2(-e x)+(b e n) \int \frac {1}{x} \, dx-\left (b e^2 n\right ) \int \frac {1}{1+e x} \, dx\\ &=b e n \log (x)-\frac {1}{2} b e n \log ^2(x)+e \log (x) \left (a+b \log \left (c x^n\right )\right )-b e n \log (1+e x)-\frac {b n \log (1+e x)}{x}-e \left (a+b \log \left (c x^n\right )\right ) \log (1+e x)-\frac {\left (a+b \log \left (c x^n\right )\right ) \log (1+e x)}{x}-b e n \text {Li}_2(-e x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.05, size = 69, normalized size = 0.64 \begin {gather*} -\frac {1}{2} b e n \log ^2(x)+e \log (x) \left (a+b n+b \log \left (c x^n\right )\right )-\frac {(1+e x) \left (a+b n+b \log \left (c x^n\right )\right ) \log (1+e x)}{x}-b e n \text {Li}_2(-e x) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[((a + b*Log[c*x^n])*Log[1 + e*x])/x^2,x]

[Out]

-1/2*(b*e*n*Log[x]^2) + e*Log[x]*(a + b*n + b*Log[c*x^n]) - ((1 + e*x)*(a + b*n + b*Log[c*x^n])*Log[1 + e*x])/
x - b*e*n*PolyLog[2, -(e*x)]

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 4.
time = 0.12, size = 481, normalized size = 4.50

method result size
risch \(\left (-\frac {b \ln \left (e x +1\right )}{x}+b e \ln \left (x \right )-b e \ln \left (e x +1\right )\right ) \ln \left (x^{n}\right )-\frac {b e n \ln \left (x \right )^{2}}{2}+n b e \ln \left (e x \right )-b e n \ln \left (e x +1\right )-\frac {b n \ln \left (e x +1\right )}{x}-e b n \dilog \left (e x +1\right )-\frac {i \pi b \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} \ln \left (e x +1\right )}{2 x}-\frac {i e \pi b \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} \ln \left (e x +1\right )}{2}+\frac {i \pi b \mathrm {csgn}\left (i c \,x^{n}\right )^{3} \ln \left (e x +1\right )}{2 x}+\frac {i e \pi b \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} \ln \left (e x \right )}{2}+\frac {i e \pi b \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right ) \ln \left (e x +1\right )}{2}+\frac {i e \pi b \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} \ln \left (e x \right )}{2}+\frac {i \pi b \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right ) \ln \left (e x +1\right )}{2 x}-\frac {i e \pi b \mathrm {csgn}\left (i c \,x^{n}\right )^{3} \ln \left (e x \right )}{2}+\frac {i e \pi b \mathrm {csgn}\left (i c \,x^{n}\right )^{3} \ln \left (e x +1\right )}{2}-\frac {i \pi b \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} \ln \left (e x +1\right )}{2 x}-\frac {i e \pi b \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} \ln \left (e x +1\right )}{2}-\frac {i e \pi b \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right ) \ln \left (e x \right )}{2}+e b \ln \left (c \right ) \ln \left (e x \right )-e b \ln \left (c \right ) \ln \left (e x +1\right )-\frac {b \ln \left (c \right ) \ln \left (e x +1\right )}{x}+a e \ln \left (e x \right )-a e \ln \left (e x +1\right )-\frac {\ln \left (e x +1\right ) a}{x}\) \(481\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*ln(c*x^n))*ln(e*x+1)/x^2,x,method=_RETURNVERBOSE)

[Out]

(-b/x*ln(e*x+1)+b*e*ln(x)-b*e*ln(e*x+1))*ln(x^n)-1/2*b*e*n*ln(x)^2+n*b*e*ln(e*x)-b*e*n*ln(e*x+1)-b*n*ln(e*x+1)
/x-e*b*n*dilog(e*x+1)-1/2*I*Pi*b*csgn(I*c)*csgn(I*c*x^n)^2*ln(e*x+1)/x-1/2*I*e*Pi*b*csgn(I*x^n)*csgn(I*c*x^n)^
2*ln(e*x+1)+1/2*I*Pi*b*csgn(I*c*x^n)^3*ln(e*x+1)/x+1/2*I*e*Pi*b*csgn(I*c)*csgn(I*c*x^n)^2*ln(e*x)+1/2*I*e*Pi*b
*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)*ln(e*x+1)+1/2*I*e*Pi*b*csgn(I*x^n)*csgn(I*c*x^n)^2*ln(e*x)+1/2*I*Pi*b*csg
n(I*c)*csgn(I*x^n)*csgn(I*c*x^n)*ln(e*x+1)/x-1/2*I*e*Pi*b*csgn(I*c*x^n)^3*ln(e*x)+1/2*I*e*Pi*b*csgn(I*c*x^n)^3
*ln(e*x+1)-1/2*I*Pi*b*csgn(I*x^n)*csgn(I*c*x^n)^2*ln(e*x+1)/x-1/2*I*e*Pi*b*csgn(I*c)*csgn(I*c*x^n)^2*ln(e*x+1)
-1/2*I*e*Pi*b*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)*ln(e*x)+e*b*ln(c)*ln(e*x)-e*b*ln(c)*ln(e*x+1)-b*ln(c)*ln(e*x
+1)/x+a*e*ln(e*x)-a*e*ln(e*x+1)-ln(e*x+1)/x*a

________________________________________________________________________________________

Maxima [A]
time = 0.32, size = 130, normalized size = 1.21 \begin {gather*} -{\left (\log \left (x e + 1\right ) \log \left (x\right ) + {\rm Li}_2\left (-x e\right )\right )} b n e - {\left (b {\left (n + \log \left (c\right )\right )} + a\right )} e \log \left (x e + 1\right ) + {\left (b {\left (n + \log \left (c\right )\right )} + a\right )} e \log \left (x\right ) - \frac {b n x e \log \left (x\right )^{2} - 2 \, {\left (b n x e \log \left (x\right ) - b {\left (n + \log \left (c\right )\right )} - a\right )} \log \left (x e + 1\right ) - 2 \, {\left (b x e \log \left (x\right ) - {\left (b x e + b\right )} \log \left (x e + 1\right )\right )} \log \left (x^{n}\right )}{2 \, x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))*log(e*x+1)/x^2,x, algorithm="maxima")

[Out]

-(log(x*e + 1)*log(x) + dilog(-x*e))*b*n*e - (b*(n + log(c)) + a)*e*log(x*e + 1) + (b*(n + log(c)) + a)*e*log(
x) - 1/2*(b*n*x*e*log(x)^2 - 2*(b*n*x*e*log(x) - b*(n + log(c)) - a)*log(x*e + 1) - 2*(b*x*e*log(x) - (b*x*e +
 b)*log(x*e + 1))*log(x^n))/x

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))*log(e*x+1)/x^2,x, algorithm="fricas")

[Out]

integral((b*log(c*x^n)*log(x*e + 1) + a*log(x*e + 1))/x^2, x)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (a + b \log {\left (c x^{n} \right )}\right ) \log {\left (e x + 1 \right )}}{x^{2}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*x**n))*ln(e*x+1)/x**2,x)

[Out]

Integral((a + b*log(c*x**n))*log(e*x + 1)/x**2, x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))*log(e*x+1)/x^2,x, algorithm="giac")

[Out]

integrate((b*log(c*x^n) + a)*log(x*e + 1)/x^2, x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\ln \left (e\,x+1\right )\,\left (a+b\,\ln \left (c\,x^n\right )\right )}{x^2} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((log(e*x + 1)*(a + b*log(c*x^n)))/x^2,x)

[Out]

int((log(e*x + 1)*(a + b*log(c*x^n)))/x^2, x)

________________________________________________________________________________________